'''
Created on May 30, 2012

@author: mupet
'''
from syslogd.gui.LogHolder import LogHolder

class ViewLogTabListener(object):
    '''
    classdocs
    '''


    def __init__(self):
        '''
        Constructor
        '''
        self.separator = "============================================================"
        
    def setLogList(self, logList):
        self.logList=logList
        
    def showLog(self, log):
        for line in log:
            self.logList.Append(line)
            
    def viewLogFile(self, event):
        print('view log file')
    
    def reloadEvent(self, event):
        self.logList.Clear()
        for line in LogHolder.getLastLogLines(6):
            self.logList.Append(line+self.separator)
    
    def live(self, event):
        print('live')
        pass